package by.parfen.game.service;

import javax.json.JsonObject;

import by.parfen.game.datamodel.GameMessage;

public interface GameMessageService {

	// convertation
	String convertMessage2String(GameMessage message);

	GameMessage convertString2Message(String text);

	// massages
	GameMessage createLoginMessage(String player);

	GameMessage createInviteMessage(String inviter, String player);

	// messages as JSON
	JsonObject encode(GameMessage message);

	GameMessage decode(String jsonStringMessage);
}
